home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / Emulation_Include_Files / winnls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  31.7 KB  |  740 lines

  1. /**************************************************************************
  2. *                                                                         *
  3. * winnls.h -- NLS procedure declarations, constant definitions and macros *
  4. *                                                                         *
  5. * Copyright (c) 1991-1998, Microsoft Corp. All rights reserved.           *
  6. *                                                                         *
  7. **************************************************************************/
  8.  
  9.  
  10. #ifndef _WINNLS_
  11. #define _WINNLS_
  12.  
  13. // @CESYSGEN IF COREDLL_CORELOC OR COREDLL_LOCUSA
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. #ifndef NONLS
  20.  
  21. /***************************************************************************\
  22. * Constants
  23. *
  24. * Define all constants for the NLS component here.
  25. \***************************************************************************/
  26.  
  27. /*
  28.  *  String Length Maximums.
  29.  */
  30. #define MAX_LEADBYTES        12             /* 5 ranges, 2 bytes ea., 0 term. */
  31. #define MAX_DEFAULTCHAR      2              /* single or double byte */
  32.  
  33. /*
  34.  *  MBCS and Unicode Translation Flags.
  35.  */
  36. #define MB_PRECOMPOSED       0x00000001     /* use precomposed chars */
  37. #define MB_COMPOSITE         0x00000002     /* use composite chars */
  38. #define MB_USEGLYPHCHARS     0x00000004     /* use glyph chars, not ctrl chars */
  39. #define MB_ERR_INVALID_CHARS 0x00000008     /* error for invalid chars */
  40.  
  41. #define WC_DEFAULTCHECK      0x00000100     /* check for default char */
  42. #define WC_COMPOSITECHECK    0x00000200     /* convert composite to precomposed */
  43. #define WC_DISCARDNS         0x00000010     /* discard non-spacing chars */
  44. #define WC_SEPCHARS          0x00000020     /* generate separate chars */
  45. #define WC_DEFAULTCHAR       0x00000040     /* replace w/ default char */
  46.  
  47. /*
  48.  *  Character Type Flags.
  49.  */
  50. #define CT_CTYPE1            0x00000001     /* ctype 1 information */
  51. #define CT_CTYPE2            0x00000002     /* ctype 2 information */
  52. #define CT_CTYPE3            0x00000004     /* ctype 3 information */
  53.  
  54. /*
  55.  *  CType 1 Flag Bits.
  56.  */
  57. #define C1_UPPER             0x0001         /* upper case */
  58. #define C1_LOWER             0x0002         /* lower case */
  59. #define C1_DIGIT             0x0004         /* decimal digits */
  60. #define C1_SPACE             0x0008         /* spacing characters */
  61. #define C1_PUNCT             0x0010         /* punctuation characters */
  62. #define C1_CNTRL             0x0020         /* control characters */
  63. #define C1_BLANK             0x0040         /* blank characters */
  64. #define C1_XDIGIT            0x0080         /* other digits */
  65. #define C1_ALPHA             0x0100         /* any linguistic character */
  66.  
  67. /*
  68.  *  CType 2 Flag Bits.
  69.  */
  70. #define C2_LEFTTORIGHT       0x0001         /* left to right */
  71. #define C2_RIGHTTOLEFT       0x0002         /* right to left */
  72.  
  73. #define C2_EUROPENUMBER      0x0003         /* European number, digit */
  74. #define C2_EUROPESEPARATOR   0x0004         /* European numeric separator */
  75. #define C2_EUROPETERMINATOR  0x0005         /* European numeric terminator */
  76. #define C2_ARABICNUMBER      0x0006         /* Arabic number */
  77. #define C2_COMMONSEPARATOR   0x0007         /* common numeric separator */
  78.  
  79. #define C2_BLOCKSEPARATOR    0x0008         /* block separator */
  80. #define C2_SEGMENTSEPARATOR  0x0009         /* segment separator */
  81. #define C2_WHITESPACE        0x000A         /* white space */
  82. #define C2_OTHERNEUTRAL      0x000B         /* other neutrals */
  83.  
  84. #define C2_NOTAPPLICABLE     0x0000         /* no implicit directionality */
  85.  
  86. /*
  87.  *  CType 3 Flag Bits.
  88.  */
  89. #define C3_NONSPACING        0x0001         /* nonspacing character */
  90. #define C3_DIACRITIC         0x0002         /* diacritic mark */
  91. #define C3_VOWELMARK         0x0004         /* vowel mark */
  92. #define C3_SYMBOL            0x0008         /* symbols */
  93.  
  94. #define C3_KATAKANA          0x0010         /* katakana character */
  95. #define C3_HIRAGANA          0x0020         /* hiragana character */
  96. #define C3_HALFWIDTH         0x0040         /* half width character */
  97. #define C3_FULLWIDTH         0x0080         /* full width character */
  98. #define C3_IDEOGRAPH         0x0100         /* ideographic character */
  99. #define C3_KASHIDA           0x0200         /* Arabic kashida character */
  100. #define C3_LEXICAL           0x0400         /* lexical character */
  101.  
  102. #define C3_ALPHA             0x8000         /* any linguistic char (C1_ALPHA) */
  103.  
  104. #define C3_NOTAPPLICABLE     0x0000         /* ctype 3 is not applicable */
  105.  
  106. /*
  107.  *  String Flags.
  108.  */
  109. #define NORM_IGNORECASE         0x00000001  /* ignore case */
  110. #define NORM_IGNORENONSPACE     0x00000002  /* ignore nonspacing chars */
  111. #define NORM_IGNORESYMBOLS      0x00000004  /* ignore symbols */
  112.  
  113. #define NORM_IGNOREKANATYPE     0x00010000  /* ignore kanatype */
  114. #define NORM_IGNOREWIDTH        0x00020000  /* ignore width */
  115.  
  116. /*
  117.  *  Locale Independent Mapping Flags.
  118.  */
  119. #define MAP_FOLDCZONE           0x00000010  /* fold compatibility zone chars */
  120. #define MAP_PRECOMPOSED         0x00000020  /* convert to precomposed chars */
  121. #define MAP_COMPOSITE           0x00000040  /* convert to composite chars */
  122. #define MAP_FOLDDIGITS          0x00000080  /* all digits to ASCII 0-9 */
  123.  
  124. /*
  125.  *  Locale Dependent Mapping Flags.
  126.  */
  127. #define LCMAP_LOWERCASE         0x00000100  /* lower case letters */
  128. #define LCMAP_UPPERCASE         0x00000200  /* upper case letters */
  129. #define LCMAP_SORTKEY           0x00000400  /* WC sort key (normalize) */
  130. #define LCMAP_BYTEREV           0x00000800  /* byte reversal */
  131.  
  132. #define LCMAP_HIRAGANA          0x00100000  /* map katakana to hiragana */
  133. #define LCMAP_KATAKANA          0x00200000  /* map hiragana to katakana */
  134. #define LCMAP_HALFWIDTH         0x00400000  /* map double byte to single byte */
  135. #define LCMAP_FULLWIDTH         0x00800000  /* map single byte to double byte */
  136.  
  137. /*
  138.  *  Locale Enumeration Flags.
  139.  */
  140. #define LCID_INSTALLED          0x00000001  /* installed locale ids */
  141. #define LCID_SUPPORTED          0x00000002  /* supported locale ids */
  142.  
  143. /*
  144.  *  Code Page Enumeration Flags.
  145.  */
  146. #define CP_INSTALLED            0x00000001  /* installed code page ids */
  147. #define CP_SUPPORTED            0x00000002  /* supported code page ids */
  148.  
  149. /*
  150.  *  Sorting Flags.
  151.  *
  152.  *    WORD Sort:    culturally correct sort
  153.  *                  hyphen and apostrophe are special cased
  154.  *                  example: "coop" and "co-op" will sort together in a list
  155.  *
  156.  *                        co_op     <-------  underscore (symbol)
  157.  *                        coat
  158.  *                        comb
  159.  *                        coop
  160.  *                        co-op     <-------  hyphen (punctuation)
  161.  *                        cork
  162.  *                        went
  163.  *                        were
  164.  *                        we're     <-------  apostrophe (punctuation)
  165.  *
  166.  *
  167.  *    STRING Sort:  hyphen and apostrophe will sort with all other symbols
  168.  *
  169.  *                        co-op     <-------  hyphen (punctuation)
  170.  *                        co_op     <-------  underscore (symbol)
  171.  *                        coat
  172.  *                        comb
  173.  *                        coop
  174.  *                        cork
  175.  *                        we're     <-------  apostrophe (punctuation)
  176.  *                        went
  177.  *                        were
  178.  */
  179. #define SORT_STRINGSORT         0x00001000  /* use string sort method */
  180.  
  181. /*
  182.  *  Code Page Default Values.
  183.  */
  184. #define CP_ACP               0              /* default to ANSI code page */
  185. #define CP_OEMCP             1              /* default to OEM  code page */
  186. #define CP_MACCP             2              /* default to MAC  code page */
  187.  
  188. /*
  189.  *  Country Codes.
  190.  */
  191. #define CTRY_DEFAULT                     0
  192.  
  193. #define CTRY_AUSTRALIA                   61      /* Australia */
  194. #define CTRY_AUSTRIA                     43      /* Austria */
  195. #define CTRY_BELGIUM                     32      /* Belgium */
  196. #define CTRY_BRAZIL                      55      /* Brazil */
  197. #define CTRY_BULGARIA                    359     /* Bulgaria */
  198. #define CTRY_CANADA                      2       /* Canada */
  199. #define CTRY_CROATIA                     385     /* Croatia */
  200. #define CTRY_CZECH                       42      /* Czech Republic */
  201. #define CTRY_DENMARK                     45      /* Denmark */
  202. #define CTRY_FINLAND                     358     /* Finland */
  203. #define CTRY_FRANCE                      33      /* France */
  204. #define CTRY_GERMANY                     49      /* Germany */
  205. #define CTRY_GREECE                      30      /* Greece */
  206. #define CTRY_HONG_KONG                   852     /* Hong Kong */
  207. #define CTRY_HUNGARY                     36      /* Hungary */
  208. #define CTRY_ICELAND                     354     /* Iceland */
  209. #define CTRY_IRELAND                     353     /* Ireland */
  210. #define CTRY_ITALY                       39      /* Italy */
  211. #define CTRY_JAPAN                       81      /* Japan */
  212. #define CTRY_MEXICO                      52      /* Mexico */
  213. #define CTRY_NETHERLANDS                 31      /* Netherlands */
  214. #define CTRY_NEW_ZEALAND                 64      /* New Zealand */
  215. #define CTRY_NORWAY                      47      /* Norway */
  216. #define CTRY_POLAND                      48      /* Poland */
  217. #define CTRY_PORTUGAL                    351     /* Portugal */
  218. #define CTRY_PRCHINA                     86      /* Peoples' Republic of China */
  219. #define CTRY_ROMANIA                     40      /* Romania */
  220. #define CTRY_RUSSIA                      7       /* Russia */
  221. #define CTRY_SINGAPORE                   65      /* Singapore */
  222. #define CTRY_SLOVAK                      42      /* Slovak Republic */
  223. #define CTRY_SLOVENIA                    386     /* Slovenia */
  224. #define CTRY_SOUTH_KOREA                 82      /* South Korea */
  225. #define CTRY_SPAIN                       34      /* Spain */
  226. #define CTRY_SWEDEN                      46      /* Sweden */
  227. #define CTRY_SWITZERLAND                 41      /* Switzerland */
  228. #define CTRY_TAIWAN                      886     /* Taiwan */
  229. #define CTRY_TURKEY                      90      /* Turkey */
  230. #define CTRY_UNITED_KINGDOM              44      /* United Kingdom */
  231. #define CTRY_UNITED_STATES               1       /* United States */
  232.  
  233. /*
  234.  *  Locale Types.
  235.  *
  236.  *  These types are used for the GetLocaleInfoW NLS API routine.
  237.  *
  238.  *  LOCALE_NOUSEROVERRIDE is also used in GetTimeFormatW and GetDateFormatW.
  239.  *
  240.  *  LOCALE_USE_CP_ACP is used in many of the A (Ansi) apis that need to do 
  241.  *  string translation.
  242.  */
  243. #define LOCALE_NOUSEROVERRIDE       0x80000000   /* do not use user overrides */
  244. #define LOCALE_USE_CP_ACP           0x40000000   /* use the system ACP */
  245.  
  246. #define LOCALE_ILANGUAGE            0x00000001   /* language id */
  247. #define LOCALE_SLANGUAGE            0x00000002   /* localized name of language */
  248. #define LOCALE_SENGLANGUAGE         0x00001001   /* English name of language */
  249. #define LOCALE_SABBREVLANGNAME      0x00000003   /* abbreviated language name */
  250. #define LOCALE_SNATIVELANGNAME      0x00000004   /* native name of language */
  251. #define LOCALE_ICOUNTRY             0x00000005   /* country code */
  252. #define LOCALE_SCOUNTRY             0x00000006   /* localized name of country */
  253. #define LOCALE_SENGCOUNTRY          0x00001002   /* English name of country */
  254. #define LOCALE_SABBREVCTRYNAME      0x00000007   /* abbreviated country name */
  255. #define LOCALE_SNATIVECTRYNAME      0x00000008   /* native name of country */
  256. #define LOCALE_IDEFAULTLANGUAGE     0x00000009   /* default language id */
  257. #define LOCALE_IDEFAULTCOUNTRY      0x0000000A   /* default country code */
  258. #define LOCALE_IDEFAULTCODEPAGE     0x0000000B   /* default oem code page */
  259. #define LOCALE_IDEFAULTANSICODEPAGE 0x00001004   /* default ansi code page */
  260.  
  261. #define LOCALE_SLIST                0x0000000C   /* list item separator */
  262. #define LOCALE_IMEASURE             0x0000000D   /* 0 = metric, 1 = US */
  263.  
  264. #define LOCALE_SDECIMAL             0x0000000E   /* decimal separator */
  265. #define LOCALE_STHOUSAND            0x0000000F   /* thousand separator */
  266. #define LOCALE_SGROUPING            0x00000010   /* digit grouping */
  267. #define LOCALE_IDIGITS              0x00000011   /* number of fractional digits */
  268. #define LOCALE_ILZERO               0x00000012   /* leading zeros for decimal */
  269. #define LOCALE_INEGNUMBER           0x00001010   /* negative number mode */
  270. #define LOCALE_SNATIVEDIGITS        0x00000013   /* native ascii 0-9 */
  271.  
  272. #define LOCALE_SCURRENCY            0x00000014   /* local monetary symbol */
  273. #define LOCALE_SINTLSYMBOL          0x00000015   /* intl monetary symbol */
  274. #define LOCALE_SMONDECIMALSEP       0x00000016   /* monetary decimal separator */
  275. #define LOCALE_SMONTHOUSANDSEP      0x00000017   /* monetary thousand separator */
  276. #define LOCALE_SMONGROUPING         0x00000018   /* monetary grouping */
  277. #define LOCALE_ICURRDIGITS          0x00000019   /* # local monetary digits */
  278. #define LOCALE_IINTLCURRDIGITS      0x0000001A   /* # intl monetary digits */
  279. #define LOCALE_ICURRENCY            0x0000001B   /* positive currency mode */
  280. #define LOCALE_INEGCURR             0x0000001C   /* negative currency mode */
  281.  
  282. #define LOCALE_SDATE                0x0000001D   /* date separator */
  283. #define LOCALE_STIME                0x0000001E   /* time separator */
  284. #define LOCALE_SSHORTDATE           0x0000001F   /* short date format string */
  285. #define LOCALE_SLONGDATE            0x00000020   /* long date format string */
  286. #define LOCALE_SYEARMONTH           0x00001020   /* year/month date format string */
  287. #define LOCALE_STIMEFORMAT          0x00001003   /* time format string */
  288. #define LOCALE_IDATE                0x00000021   /* short date format ordering */
  289. #define LOCALE_ILDATE               0x00000022   /* long date format ordering */
  290. #define LOCALE_ITIME                0x00000023   /* time format specifier */
  291. #define LOCALE_ITIMEMARKPOSN        0x00001005   /* time marker position */
  292. #define LOCALE_ICENTURY             0x00000024   /* century format specifier (short date) */
  293. #define LOCALE_ITLZERO              0x00000025   /* leading zeros in time field */
  294. #define LOCALE_IDAYLZERO            0x00000026   /* leading zeros in day field (short date) */
  295. #define LOCALE_IMONLZERO            0x00000027   /* leading zeros in month field (short date) */
  296. #define LOCALE_S1159                0x00000028   /* AM designator */
  297. #define LOCALE_S2359                0x00000029   /* PM designator */
  298.  
  299. #define LOCALE_ICALENDARTYPE        0x00001009   /* type of calendar specifier */
  300. #define LOCALE_IOPTIONALCALENDAR    0x0000100B   /* additional calendar types specifier */
  301. #define LOCALE_IFIRSTDAYOFWEEK      0x0000100C   /* first day of week specifier */
  302. #define LOCALE_IFIRSTWEEKOFYEAR     0x0000100D   /* first week of year specifier */
  303.  
  304. #define LOCALE_SDAYNAME1            0x0000002A   /* long name for Monday */
  305. #define LOCALE_SDAYNAME2            0x0000002B   /* long name for Tuesday */
  306. #define LOCALE_SDAYNAME3            0x0000002C   /* long name for Wednesday */
  307. #define LOCALE_SDAYNAME4            0x0000002D   /* long name for Thursday */
  308. #define LOCALE_SDAYNAME5            0x0000002E   /* long name for Friday */
  309. #define LOCALE_SDAYNAME6            0x0000002F   /* long name for Saturday */
  310. #define LOCALE_SDAYNAME7            0x00000030   /* long name for Sunday */
  311. #define LOCALE_SABBREVDAYNAME1      0x00000031   /* abbreviated name for Monday */
  312. #define LOCALE_SABBREVDAYNAME2      0x00000032   /* abbreviated name for Tuesday */
  313. #define LOCALE_SABBREVDAYNAME3      0x00000033   /* abbreviated name for Wednesday */
  314. #define LOCALE_SABBREVDAYNAME4      0x00000034   /* abbreviated name for Thursday */
  315. #define LOCALE_SABBREVDAYNAME5      0x00000035   /* abbreviated name for Friday */
  316. #define LOCALE_SABBREVDAYNAME6      0x00000036   /* abbreviated name for Saturday */
  317. #define LOCALE_SABBREVDAYNAME7      0x00000037   /* abbreviated name for Sunday */
  318. #define LOCALE_SMONTHNAME1          0x00000038   /* long name for January */
  319. #define LOCALE_SMONTHNAME2          0x00000039   /* long name for February */
  320. #define LOCALE_SMONTHNAME3          0x0000003A   /* long name for March */
  321. #define LOCALE_SMONTHNAME4          0x0000003B   /* long name for April */
  322. #define LOCALE_SMONTHNAME5          0x0000003C   /* long name for May */
  323. #define LOCALE_SMONTHNAME6          0x0000003D   /* long name for June */
  324. #define LOCALE_SMONTHNAME7          0x0000003E   /* long name for July */
  325. #define LOCALE_SMONTHNAME8          0x0000003F   /* long name for August */
  326. #define LOCALE_SMONTHNAME9          0x00000040   /* long name for September */
  327. #define LOCALE_SMONTHNAME10         0x00000041   /* long name for October */
  328. #define LOCALE_SMONTHNAME11         0x00000042   /* long name for November */
  329. #define LOCALE_SMONTHNAME12         0x00000043   /* long name for December */
  330. #define LOCALE_SMONTHNAME13         0x0000100E   /* long name for 13th month (if exists) */
  331. #define LOCALE_SABBREVMONTHNAME1    0x00000044   /* abbreviated name for January */
  332. #define LOCALE_SABBREVMONTHNAME2    0x00000045   /* abbreviated name for February */
  333. #define LOCALE_SABBREVMONTHNAME3    0x00000046   /* abbreviated name for March */
  334. #define LOCALE_SABBREVMONTHNAME4    0x00000047   /* abbreviated name for April */
  335. #define LOCALE_SABBREVMONTHNAME5    0x00000048   /* abbreviated name for May */
  336. #define LOCALE_SABBREVMONTHNAME6    0x00000049   /* abbreviated name for June */
  337. #define LOCALE_SABBREVMONTHNAME7    0x0000004A   /* abbreviated name for July */
  338. #define LOCALE_SABBREVMONTHNAME8    0x0000004B   /* abbreviated name for August */
  339. #define LOCALE_SABBREVMONTHNAME9    0x0000004C   /* abbreviated name for September */
  340. #define LOCALE_SABBREVMONTHNAME10   0x0000004D   /* abbreviated name for October */
  341. #define LOCALE_SABBREVMONTHNAME11   0x0000004E   /* abbreviated name for November */
  342. #define LOCALE_SABBREVMONTHNAME12   0x0000004F   /* abbreviated name for December */
  343. #define LOCALE_SABBREVMONTHNAME13   0x0000100F   /* abbreviated name for 13th month (if exists) */
  344.  
  345. #define LOCALE_SPOSITIVESIGN        0x00000050   /* positive sign */
  346. #define LOCALE_SNEGATIVESIGN        0x00000051   /* negative sign */
  347. #define LOCALE_IPOSSIGNPOSN         0x00000052   /* positive sign position */
  348. #define LOCALE_INEGSIGNPOSN         0x00000053   /* negative sign position */
  349. #define LOCALE_IPOSSYMPRECEDES      0x00000054   /* mon sym precedes pos amt */
  350. #define LOCALE_IPOSSEPBYSPACE       0x00000055   /* mon sym sep by space from pos amt */
  351. #define LOCALE_INEGSYMPRECEDES      0x00000056   /* mon sym precedes neg amt */
  352. #define LOCALE_INEGSEPBYSPACE       0x00000057   /* mon sym sep by space from neg amt */
  353.  
  354. #define LOCALE_IPAPERSIZE            0x0000100a    /* 0 = letter, 1 = a4, 2 = legal, 3 = a3 */
  355.  
  356. /*
  357.  *  Time Flags for GetTimeFormatW.
  358.  */
  359. #define TIME_NOMINUTESORSECONDS    0x00000001  /* do not use minutes or seconds */
  360. #define TIME_NOSECONDS             0x00000002  /* do not use seconds */
  361. #define TIME_NOTIMEMARKER          0x00000004  /* do not use time marker */
  362. #define TIME_FORCE24HOURFORMAT     0x00000008  /* always use 24 hour format */
  363.  
  364. /*
  365.  *  Date Flags for GetDateFormatW.
  366.  */
  367. #define DATE_SHORTDATE             0x00000001  /* use short date picture */
  368. #define DATE_LONGDATE              0x00000002  /* use long date picture */
  369. #define DATE_USE_ALT_CALENDAR      0x00000004  /* use alternate calendar (if any) */
  370.  
  371. /*
  372.  *  Calendar Types.
  373.  *
  374.  *  These types are used for the GetALTCalendarInfoW NLS API routine.
  375.  */
  376. #define CAL_ICALINTVALUE           0x00000001   /* calendar type */
  377. #define CAL_SCALNAME               0x00000002   /* native name of calendar */
  378. #define CAL_IYEAROFFSETRANGE       0x00000003   /* starting years of eras */
  379. #define CAL_SERASTRING             0x00000004   /* era name for IYearOffsetRanges */
  380. #define CAL_SSHORTDATE             0x00000005   /* short date format string */
  381. #define CAL_SLONGDATE              0x00000006   /* long date format string */
  382. #define CAL_SDAYNAME1              0x00000007   /* native name for Monday */
  383. #define CAL_SDAYNAME2              0x00000008   /* native name for Tuesday */
  384. #define CAL_SDAYNAME3              0x00000009   /* native name for Wednesday */
  385. #define CAL_SDAYNAME4              0x0000000a   /* native name for Thursday */
  386. #define CAL_SDAYNAME5              0x0000000b   /* native name for Friday */
  387. #define CAL_SDAYNAME6              0x0000000c   /* native name for Saturday */
  388. #define CAL_SDAYNAME7              0x0000000d   /* native name for Sunday */
  389. #define CAL_SABBREVDAYNAME1        0x0000000e   /* abbreviated name for Monday */
  390. #define CAL_SABBREVDAYNAME2        0x0000000f   /* abbreviated name for Tuesday */
  391. #define CAL_SABBREVDAYNAME3        0x00000010   /* abbreviated name for Wednesday */
  392. #define CAL_SABBREVDAYNAME4        0x00000011   /* abbreviated name for Thursday */
  393. #define CAL_SABBREVDAYNAME5        0x00000012   /* abbreviated name for Friday */
  394. #define CAL_SABBREVDAYNAME6        0x00000013   /* abbreviated name for Saturday */
  395. #define CAL_SABBREVDAYNAME7        0x00000014   /* abbreviated name for Sunday */
  396. #define CAL_SMONTHNAME1            0x00000015   /* native name for January */
  397. #define CAL_SMONTHNAME2            0x00000016   /* native name for February */
  398. #define CAL_SMONTHNAME3            0x00000017   /* native name for March */
  399. #define CAL_SMONTHNAME4            0x00000018   /* native name for April */
  400. #define CAL_SMONTHNAME5            0x00000019   /* native name for May */
  401. #define CAL_SMONTHNAME6            0x0000001a   /* native name for June */
  402. #define CAL_SMONTHNAME7            0x0000001b   /* native name for July */
  403. #define CAL_SMONTHNAME8            0x0000001c   /* native name for August */
  404. #define CAL_SMONTHNAME9            0x0000001d   /* native name for September */
  405. #define CAL_SMONTHNAME10           0x0000001e   /* native name for October */
  406. #define CAL_SMONTHNAME11           0x0000001f   /* native name for November */
  407. #define CAL_SMONTHNAME12           0x00000020   /* native name for December */
  408. #define CAL_SMONTHNAME13           0x00000021   /* native name for 13th month (if any) */
  409. #define CAL_SABBREVMONTHNAME1      0x00000022   /* abbreviated name for January */
  410. #define CAL_SABBREVMONTHNAME2      0x00000023   /* abbreviated name for February */
  411. #define CAL_SABBREVMONTHNAME3      0x00000024   /* abbreviated name for March */
  412. #define CAL_SABBREVMONTHNAME4      0x00000025   /* abbreviated name for April */
  413. #define CAL_SABBREVMONTHNAME5      0x00000026   /* abbreviated name for May */
  414. #define CAL_SABBREVMONTHNAME6      0x00000027   /* abbreviated name for June */
  415. #define CAL_SABBREVMONTHNAME7      0x00000028   /* abbreviated name for July */
  416. #define CAL_SABBREVMONTHNAME8      0x00000029   /* abbreviated name for August */
  417. #define CAL_SABBREVMONTHNAME9      0x0000002a   /* abbreviated name for September */
  418. #define CAL_SABBREVMONTHNAME10     0x0000002b   /* abbreviated name for October */
  419. #define CAL_SABBREVMONTHNAME11     0x0000002c   /* abbreviated name for November */
  420. #define CAL_SABBREVMONTHNAME12     0x0000002d   /* abbreviated name for December */
  421. #define CAL_SABBREVMONTHNAME13     0x0000002e   /* abbreviated name for 13th month (if any) */
  422.  
  423. /*
  424.  *  Calendar Enumeration Value.
  425.  */
  426. #define ENUM_ALL_CALENDARS         0xffffffff   /* enumerate all calendars */
  427.  
  428. /*
  429.  *  Calendar ID Values.
  430.  */
  431. #define CAL_GREGORIAN        1         /* Gregorian (localized) calendar */
  432. #define CAL_GREGORIAN_US     2         /* Gregorian (U.S.) calendar */
  433. #define CAL_JAPAN            3         /* Japanese Emperor Era calendar */
  434. #define CAL_TAIWAN           4         /* Republic of China Era calendar */
  435. #define CAL_KOREA            5         /* Korean Tangun Era calendar */
  436. #define CAL_HIRJI             6           /* Hirji (Arabic Lunar) calendar */
  437. #define CAL_THAI             7           /* Thai calendar */
  438. #define CAL_HEBREW             8           /* Hebrew calendar */
  439.  
  440. /***************************************************************************\
  441. * Typedefs
  442. *
  443. * Define all types for the NLS component here.
  444. \***************************************************************************/
  445.  
  446. /*
  447.  *  Locale type constant.
  448.  */
  449. typedef DWORD LCTYPE;
  450.  
  451. /*
  452.  *  Calendar type constant.
  453.  */
  454. typedef DWORD CALTYPE;
  455.  
  456. /*
  457.  *  Calendar ID.
  458.  */
  459. typedef DWORD CALID;
  460.  
  461. /*
  462.  *  CP Info.
  463.  */
  464.  
  465. typedef struct _cpinfo {
  466.     UINT    MaxCharSize;                    /* max length (bytes) of a char */
  467.     BYTE    DefaultChar[MAX_DEFAULTCHAR];   /* default character */
  468.     BYTE    LeadByte[MAX_LEADBYTES];        /* lead byte ranges */
  469. } CPINFO, *LPCPINFO;
  470.  
  471. /*
  472.  *  Number format.
  473.  */
  474.  
  475. typedef struct _numberfmtW {
  476.     UINT    NumDigits;                 /* number of decimal digits */
  477.     UINT    LeadingZero;               /* if leading zero in decimal fields */
  478.     UINT    Grouping;                  /* group size left of decimal */
  479.     LPWSTR  lpDecimalSep;              /* ptr to decimal separator string */
  480.     LPWSTR  lpThousandSep;             /* ptr to thousand separator string */
  481.     UINT    NegativeOrder;             /* negative number ordering */
  482. } NUMBERFMTW, *LPNUMBERFMTW;
  483.  
  484. typedef NUMBERFMTW NUMBERFMT;
  485. typedef LPNUMBERFMTW LPNUMBERFMT;
  486.  
  487. /*
  488.  *  Currency format.
  489.  */
  490.  
  491. typedef struct _currencyfmtW {
  492.     UINT    NumDigits;                 /* number of decimal digits */
  493.     UINT    LeadingZero;               /* if leading zero in decimal fields */
  494.     UINT    Grouping;                  /* group size left of decimal */
  495.     LPWSTR  lpDecimalSep;              /* ptr to decimal separator string */
  496.     LPWSTR  lpThousandSep;             /* ptr to thousand separator string */
  497.     UINT    NegativeOrder;             /* negative currency ordering */
  498.     UINT    PositiveOrder;             /* positive currency ordering */
  499.     LPWSTR  lpCurrencySymbol;          /* ptr to currency symbol string */
  500. } CURRENCYFMTW, *LPCURRENCYFMTW;
  501.  
  502. typedef CURRENCYFMTW CURRENCYFMT;
  503. typedef LPCURRENCYFMTW LPCURRENCYFMT;
  504.  
  505. /*
  506.  *  Enumeration function constants.
  507.  */
  508.  
  509. #ifdef STRICT
  510.  
  511. typedef BOOL (CALLBACK* LOCALE_ENUMPROCW)(LPWSTR);
  512. typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCW)(LPWSTR);
  513. typedef BOOL (CALLBACK* DATEFMT_ENUMPROCW)(LPWSTR);
  514. typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCW)(LPWSTR);
  515. typedef BOOL (CALLBACK* CALINFO_ENUMPROCW)(LPWSTR);
  516.  
  517. #else /* !STRICT */
  518.  
  519. typedef FARPROC LOCALE_ENUMPROCW;
  520. typedef FARPROC CODEPAGE_ENUMPROCW;
  521. typedef FARPROC DATEFMT_ENUMPROCW;
  522. typedef FARPROC TIMEFMT_ENUMPROCW;
  523. typedef FARPROC CALINFO_ENUMPROCW;
  524.  
  525. #endif /* !STRICT */
  526.  
  527. #define LOCALE_ENUMPROC    LOCALE_ENUMPROCW
  528. #define CODEPAGE_ENUMPROC  CODEPAGE_ENUMPROCW
  529. #define DATEFMT_ENUMPROC   DATEFMT_ENUMPROCW
  530. #define TIMEFMT_ENUMPROC   TIMEFMT_ENUMPROCW
  531. #define CALINFO_ENUMPROC   CALINFO_ENUMPROCW
  532.  
  533. /***************************************************************************\
  534. * Function Prototypes
  535. *
  536. * Only prototypes for the NLS APIs should go here.
  537. \***************************************************************************/
  538.  
  539. /*
  540.  *  Code Page Dependent APIs.
  541.  */
  542.  
  543. BOOL WINAPI IsValidCodePage(UINT CodePage);
  544.  
  545. UINT WINAPI GetACP(void);
  546.  
  547. UINT WINAPI GetOEMCP(void);
  548.  
  549. BOOL WINAPI GetCPInfo(UINT CodePage, LPCPINFO lpCPInfo);
  550.  
  551. BOOL WINAPI IsDBCSLeadByte(BYTE TestChar);
  552.  
  553. BOOL WINAPI IsDBCSLeadByteEx(UINT CodePage, BYTE TestChar);
  554.  
  555. int WINAPI MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr,
  556.     int cchMultiByte, LPWSTR lpWideCharStr, int cchWideChar);
  557.  
  558. int WINAPI WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr,
  559.     int cchWideChar, LPSTR lpMultiByteStr, int cchMultiByte, LPCSTR lpDefaultChar,
  560.     LPBOOL lpUsedDefaultChar);
  561.  
  562. #define CSTR_LESS_THAN 1
  563. #define CSTR_EQUAL 2
  564. #define CSTR_GREATER_THAN 3
  565.  
  566. int WINAPI CompareStringW(LCID Locale, DWORD dwCmpFlags, LPCWSTR lpString1,
  567.     int cchCount1, LPCWSTR lpString2, int cchCount2);
  568.  
  569. #ifdef UNICODE
  570. #define CompareString  CompareStringW
  571. #else
  572. #define CompareString  CompareStringA
  573. #endif
  574.  
  575. int WINAPI LCMapStringW(LCID Locale, DWORD dwMapFlags, LPCWSTR lpSrcStr,
  576.     int cchSrc, LPWSTR lpDestStr, int cchDest);
  577.  
  578. #ifdef UNICODE
  579. #define LCMapString  LCMapStringW
  580. #else
  581. #define LCMapString  LCMapStringA
  582. #endif
  583.  
  584. int WINAPI GetLocaleInfoW(LCID Locale, LCTYPE LCType, LPWSTR lpLCData, int cchData);
  585.  
  586. #ifdef UNICODE
  587. #define GetLocaleInfo  GetLocaleInfoW
  588. #else
  589. #define GetLocaleInfo  GetLocaleInfoA
  590. #endif
  591.  
  592. BOOL WINAPI SetLocaleInfoW(LCID Locale, LCTYPE LCType, LPCWSTR lpLCData);
  593.  
  594. #ifdef UNICODE
  595. #define SetLocaleInfo  SetLocaleInfoW
  596. #else
  597. #define SetLocaleInfo  SetLocaleInfoA
  598. #endif
  599.  
  600. int WINAPI GetTimeFormatW(LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpTime,
  601.     LPCWSTR lpFormat, LPWSTR lpTimeStr, int cchTime);
  602.  
  603. #ifdef UNICODE
  604. #define GetTimeFormat  GetTimeFormatW
  605. #else
  606. #define GetTimeFormat  GetTimeFormatA
  607. #endif
  608.  
  609. int WINAPI GetDateFormatW(LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate,
  610.     LPCWSTR lpFormat, LPWSTR lpDateStr, int cchDate);
  611.  
  612. #ifdef UNICODE
  613. #define GetDateFormat  GetDateFormatW
  614. #else
  615. #define GetDateFormat  GetDateFormatA
  616. #endif
  617.  
  618. int WINAPI GetNumberFormatW(LCID Locale, DWORD dwFlags, LPCWSTR lpValue,
  619.     const NUMBERFMTW *lpFormat, LPWSTR lpNumberStr, int cchNumber);
  620.  
  621. #ifdef UNICODE
  622. #define GetNumberFormat  GetNumberFormatW
  623. #else
  624. #define GetNumberFormat  GetNumberFormatA
  625. #endif
  626.  
  627. int WINAPI GetCurrencyFormatW(LCID Locale, DWORD dwFlags, LPCWSTR lpValue,
  628.     const CURRENCYFMTW *lpFormat, LPWSTR  lpCurrencyStr, int cchCurrency);
  629.  
  630. #ifdef UNICODE
  631. #define GetCurrencyFormat  GetCurrencyFormatW
  632. #else
  633. #define GetCurrencyFormat  GetCurrencyFormatA
  634. #endif
  635.  
  636. BOOL WINAPI EnumCalendarInfoW(CALINFO_ENUMPROCW lpCalInfoEnumProc,
  637.     LCID Locale, CALID Calendar, CALTYPE CalType);
  638.  
  639. #ifdef UNICODE
  640. #define EnumCalendarInfo  EnumCalendarInfoW
  641. #else
  642. #define EnumCalendarInfo  EnumCalendarInfoA
  643. #endif
  644.  
  645. BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW lpTimeFmtEnumProc,
  646.     LCID Locale, DWORD dwFlags);
  647.  
  648. #ifdef UNICODE
  649. #define EnumTimeFormats  EnumTimeFormatsW
  650. #else
  651. #define EnumTimeFormats  EnumTimeFormatsA
  652. #endif
  653.  
  654. BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW lpDateFmtEnumProc,
  655.     LCID Locale, DWORD dwFlags);
  656.  
  657. #ifdef UNICODE
  658. #define EnumDateFormats  EnumDateFormatsW
  659. #else
  660. #define EnumDateFormats  EnumDateFormatsA
  661. #endif
  662.  
  663. BOOL WINAPI IsValidLocale(LCID Locale, DWORD dwFlags);
  664.  
  665. LCID WINAPI ConvertDefaultLocale(LCID Locale);
  666.  
  667. LANGID WINAPI GetSystemDefaultLangID(void);
  668.  
  669. LANGID WINAPI GetUserDefaultLangID(void);
  670.  
  671. LCID WINAPI GetSystemDefaultLCID(void);
  672.  
  673. LCID WINAPI GetUserDefaultLCID(void);
  674.  
  675. /*
  676.  *  Locale Independent APIs.
  677.  */
  678.  
  679. BOOL WINAPI GetStringTypeW(DWORD dwInfoType, LPCWSTR lpSrcStr, int cchSrc, LPWORD lpCharType);
  680.  
  681. #ifdef UNICODE
  682. #define GetStringType GetStringTypeW
  683. #else
  684. #define GetStringType GetStringTypeA
  685. #endif
  686.  
  687. BOOL WINAPI GetStringTypeExW(LCID Locale, DWORD dwInfoType, LPCWSTR lpSrcStr,
  688.     int cchSrc, LPWORD lpCharType);
  689.  
  690. #ifdef UNICODE
  691. #define GetStringTypeEx  GetStringTypeExW
  692. #else
  693. #define GetStringTypeEx  GetStringTypeExA
  694. #endif
  695.  
  696. int WINAPI FoldStringW(DWORD dwMapFlags, LPCWSTR lpSrcStr,  int cchSrc, LPWSTR lpDestStr, int cchDest);
  697.  
  698. #ifdef UNICODE
  699. #define FoldString  FoldStringW
  700. #else
  701. #define FoldString  FoldStringA
  702. #endif
  703.  
  704. BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW lpLocaleEnumProc, DWORD dwFlags);
  705.  
  706. #ifdef UNICODE
  707. #define EnumSystemLocales  EnumSystemLocalesW
  708. #else
  709. #define EnumSystemLocales  EnumSystemLocalesA
  710. #endif
  711.  
  712. BOOL WINAPI EnumSystemCodePagesW(CODEPAGE_ENUMPROCW lpCodePageEnumProc, DWORD dwFlags);
  713.  
  714. #ifdef UNICODE
  715. #define EnumSystemCodePages  EnumSystemCodePagesW
  716. #else
  717. #define EnumSystemCodePages  EnumSystemCodePagesA
  718. #endif
  719.  
  720. #ifdef _WIN32_WCE_EMULATION
  721. BOOL WINAPI SetSystemDefaultLCID(LCID Locale);
  722. BOOL WINAPI SetOEMCP(UINT oemcp);
  723. BOOL WINAPI SetACP(UINT acp);
  724. #else
  725. BOOL SetSystemDefaultLCID(LCID Locale);
  726. BOOL SetOEMCP(UINT oemcp);
  727. BOOL SetACP(UINT acp);
  728. #endif
  729.  
  730. #endif   // NONLS
  731.  
  732. #ifdef __cplusplus
  733. }
  734. #endif
  735.  
  736. // @CESYSGEN ENDIF
  737.  
  738. #endif   // _WINNLS_
  739.  
  740.